package com.xs.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xs.dao.TypeDao;
import com.xs.entity.Type;
import com.xs.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TypeServiceImpl extends ServiceImpl<TypeDao, Type> implements TypeService {

    @Autowired
    private TypeDao typeDao;

    @Override
    public Type getByTid(Integer tid) {
        QueryWrapper<Type> wrapper=new QueryWrapper<Type>();
        wrapper.eq("tid",tid);
        return typeDao.selectOne(wrapper);
    }

}
